package cn.com.cennavi.dataToTmc;

import com.alibaba.fastjson.JSON;

public class TestJson {
	public static void main(String[] args) {
		LaneLinkData data = new LaneLinkData();
		Content ct = new Content();
//		ct.delay = "123";
//		ct.extensions = "123";
//		ct.freeflowTravelTime = "123";
//		ct.los = "123";
		ct.speed = "123";

		Location lt = new Location();
		lt.linkid = "456";
		lt.secLen = "456";
		lt.secNo = "456";

		Restriction rt = new Restriction();
		rt.laneRestriction = "789";
		rt.laneTotalNumber = "789";
		rt.laneTurnFlag = "789";

		data.content = ct;
		data.location = lt;
		data.restriction = rt;

		LaneLinkData[] ld = new LaneLinkData[1];
		ld[0] = new LaneLinkData();
		ld[0] = data;

		
		JsonData jdata = new JsonData();
		jdata.LaneLinkData.add(data);
		String jsonObject = JSON.toJSONString(jdata);
		System.out.println(jsonObject);
	}
}
